package com.cesc.demo.domain.product;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

public interface IDomainService<Entity> {

   Mono<Entity> saveByRespository(Entity entity);
   Mono<Entity> saveByRespositoryWithRollBack(Entity entity);
   Mono<Void> deletByIdByRespository(Long id);
   Mono<Entity> findByIdByRespository(Long id);

   Mono<Entity> saveByAccessApi(Entity entity);
   Mono<Entity> updateByAccessApi(Entity entity);
   Mono<Integer> deleteByAccessApi(Entity entity);
   Mono<PageResult<Entity>> findByAccessApi(Entity entity,int pageSize, int page);
}
